{template 'common/header'}
<style>
.account-stat{overflow:hidden; color:#666;}
.account-stat .account-stat-btn{width:100%; overflow:hidden;}
.account-stat .account-stat-btn > div{text-align:center; margin-bottom:5px;margin-right:2%; float:left;width:23%; height:80px; padding-top:10px;font-size:16px; border-left:1px #DDD solid;}
.account-stat .account-stat-btn > div:first-child{border-left:0;}
.account-stat .account-stat-btn > div span{display:block; font-size:30px; font-weight:bold}
.account-stat .account-stat-btn > div p{font-size:12px;margin: 3px 0 2px;}
</style>
<div class="main">
	<ul class="nav nav-tabs">
		<li><a href="{php echo $this->createWebUrl('list');}">防伪码列表</a></li>
		{if !$_W['isfounder']}
		<li><a href="{php echo $this->createWebUrl('create');}">生成防伪码</a></li>
		<li><a href="{php echo $this->createWebUrl('insert');}">数据导入</a></li>
		{/if}
		<li class="active"><a href="{php echo $this->createWebUrl('logs');}">查询记录</a></li>
	</ul>
</div>
<div class="panel panel-default" style="padding:1em;">
	<div class="account-stat">
		<div class="account-stat-btn">
			<div>总计查询数<span>{$data_1_all}</span></div>
			<div>总计成功查询<span>{$data_2_all}</span></div>
			<div>总计失败查询<span>{$data_3_all}</span></div>
			<div>图例<p style="color: blue;">蓝色：总数</p><p style="color: green;">绿色：成功数</p></div>
		</div>
	</div>
	<div style="margin-top:10px;">
		<canvas id="canvas" height="180" width="500"></canvas>
	</div>
</div>
<script src="/addons/hx_securityspro/template/style/Chart.js"></script>
	<script>
		var lineChartData = {
			labels : [{$labels}],
			datasets : [
				{
					label: "My First dataset",
					fillColor : "rgba(220,220,220,0.2)",
					strokeColor : "blue",
					pointColor : "blue",
					pointStrokeColor : "#fff",
					pointHighlightFill : "#fff",
					pointHighlightStroke : "rgba(220,220,220,1)",
					data : [{$data_1}]
				},
				{
					label: "My Second dataset",
					fillColor : "rgba(151,187,205,0.2)",
					strokeColor : "green",
					pointColor : "green",
					pointStrokeColor : "#fff",
					pointHighlightFill : "#fff",
					pointHighlightStroke : "rgba(151,187,205,1)",
					data : [{$data_2}]
				}
			]

		}

	window.onload = function(){
		var ctx = document.getElementById("canvas").getContext("2d");
		window.myLine = new Chart(ctx).Line(lineChartData, {
			responsive: true
		});
	}
	</script>
{template 'common/footer'}